/**
 * created on 2019/05/20 by wxb
 */
(function () {
  'use strict';

  angular.module('BlurAdmin')
    .controller('SetPasswordModalCtrl', SetPasswordModalCtrl);

  /** @ngInject */
  function SetPasswordModalCtrl($scope, $uibModalInstance) {
    $scope.formData = {};

    $scope.passwordValidator = function(password) {
      if(!password){return;}
      if (password.length < 6) {
        return "密码长度至少 " + 6 + " 位";
      }
      return true;
    };

    $scope.newPasswordValidator = function(password) {
      if(!password){return;}
      if (password.length < 6) {
        return "密码长度至少 " + 6 + " 位";
      }

      return true;
    };

    $scope.validate = function () {
      console.log('validate', $scope.formData);

      $scope.validateFlag = true;
    };

    $scope.ok = function () {
      console.log('ok', $scope.formData);
      $uibModalInstance.close($scope.formData);
    };

    $scope.cancel = function () {
      $uibModalInstance.dismiss('cancel');
    };









  }
})();
